< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03102300.xhp

(section: isdate) (bookmark: bm_id3145090)
IsDate function

IsDate 関数

IsDate Function [Runtime]
IsDate 関数 [実行時](hd_id3145090.1)

Tests if a numeric or string expression can be converted to a Date variable.
数値ないし文字列表式が 日付 変数に変換できるかを判定します。(par_id3153311.2)

(/section: isdate)

Syntax:
構文:(hd_id3153824.3)

IsDate (Expression)
IsDate (Expression)(par_id3147573.4)

Return value:
戻り値:(hd_id3143270.5)

Bool
ブール型(par_id3147560.6)

Parameters:
パラメータ:(hd_id3148947.7)

Expression: Any numeric or string expression that you want to test. If the expression can be converted to a date, the function returns True, otherwise the function returns False.
Expression: 評価する数値ないし文字列表式。この関数は、与えられた表式が日付データに変換できる場合に True を返し、それ以外の場合は False を返します。(par_id3145069.8)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3150447.9)

Sub ExampleIsDate
Sub ExampleIsDate(par_id3154217.10)

Dim sDateVar as String
Dim sDateVar as String(par_id3153970.11)

sDateVar = "12.12.1997"
sDateVar = "1997.12.12"(par_id3153193.12)

print IsDate(sDateVar) REM Returns True
print IsDate(sDateVar) REM 戻り値は True(par_id3150869.13)

sDateVar = "12121997"
sDateVar = "19971212"(par_id3148453.14)

print IsDate(sDateVar) REM Returns False
print IsDate(sDateVar) REM 戻り値は False(par_id3147288.15)

end sub
end sub(par_id3155132.16)


< Prev / Next >